Optimal. Leaf size=384 \[ \frac {\sqrt {a-c-\sqrt {a^2+b^2-2 a c+c^2}} \tanh ^{-1}\left (\frac {a-c-\sqrt {a^2+b^2-2 a c+c^2}+b \cot (d+e x)}{\sqrt {2} \sqrt {a-c-\sqrt {a^2+b^2-2 a c+c^2}} \sqrt {a+b \cot (d+e x)+c \cot ^2(d+e x)}}\right )}{\sqrt {2} \sqrt {a^2+b^2-2 a c+c^2} e}-\frac {\sqrt {a-c+\sqrt {a^2+b^2-2 a c+c^2}} \tanh ^{-1}\left (\frac {a-c+\sqrt {a^2+b^2-2 a c+c^2}+b \cot (d+e x)}{\sqrt {2} \sqrt {a-c+\sqrt {a^2+b^2-2 a c+c^2}} \sqrt {a+b \cot (d+e x)+c \cot ^2(d+e x)}}\right )}{\sqrt {2} \sqrt {a^2+b^2-2 a c+c^2} e}+\frac {b \tanh ^{-1}\left (\frac {b+2 c \cot (d+e x)}{2 \sqrt {c} \sqrt {a+b \cot (d+e x)+c \cot ^2(d+e x)}}\right )}{2 c^{3/2} e}-\frac {\sqrt {a+b \cot (d+e x)+c \cot ^2(d+e x)}}{c e} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.51, antiderivative size = 384, normalized size of antiderivative = 1.00, number of steps
used = 11, number of rules used = 8, integrand size = 33, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.242, Rules used = {3782, 6857,
654, 635, 212, 1050, 1044, 214} \begin {gather*} \frac {\sqrt {-\sqrt {a^2-2 a c+b^2+c^2}+a-c} \tanh ^{-1}\left (\frac {-\sqrt {a^2-2 a c+b^2+c^2}+a+b \cot (d+e x)-c}{\sqrt {2} \sqrt {-\sqrt {a^2-2 a c+b^2+c^2}+a-c} \sqrt {a+b \cot (d+e x)+c \cot ^2(d+e x)}}\right )}{\sqrt {2} e \sqrt {a^2-2 a c+b^2+c^2}}-\frac {\sqrt {\sqrt {a^2-2 a c+b^2+c^2}+a-c} \tanh ^{-1}\left (\frac {\sqrt {a^2-2 a c+b^2+c^2}+a+b \cot (d+e x)-c}{\sqrt {2} \sqrt {\sqrt {a^2-2 a c+b^2+c^2}+a-c} \sqrt {a+b \cot (d+e x)+c \cot ^2(d+e x)}}\right )}{\sqrt {2} e \sqrt {a^2-2 a c+b^2+c^2}}+\frac {b \tanh ^{-1}\left (\frac {b+2 c \cot (d+e x)}{2 \sqrt {c} \sqrt {a+b \cot (d+e x)+c \cot ^2(d+e x)}}\right )}{2 c^{3/2} e}-\frac {\sqrt {a+b \cot (d+e x)+c \cot ^2(d+e x)}}{c e} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 212
Rule 214
Rule 635
Rule 654
Rule 1044
Rule 1050
Rule 3782
Rule 6857
Rubi steps
\begin {align*} \int \frac {\cot ^3(d+e x)}{\sqrt {a+b \cot (d+e x)+c \cot ^2(d+e x)}} \, dx &=-\frac {\text {Subst}\left (\int \frac {x^3}{\left (1+x^2\right ) \sqrt {a+b x+c x^2}} \, dx,x,\cot (d+e x)\right )}{e}\\ &=-\frac {\text {Subst}\left (\int \left (\frac {x}{\sqrt {a+b x+c x^2}}-\frac {x}{\left (1+x^2\right ) \sqrt {a+b x+c x^2}}\right ) \, dx,x,\cot (d+e x)\right )}{e}\\ &=-\frac {\text {Subst}\left (\int \frac {x}{\sqrt {a+b x+c x^2}} \, dx,x,\cot (d+e x)\right )}{e}+\frac {\text {Subst}\left (\int \frac {x}{\left (1+x^2\right ) \sqrt {a+b x+c x^2}} \, dx,x,\cot (d+e x)\right )}{e}\\ &=-\frac {\sqrt {a+b \cot (d+e x)+c \cot ^2(d+e x)}}{c e}+\frac {b \text {Subst}\left (\int \frac {1}{\sqrt {a+b x+c x^2}} \, dx,x,\cot (d+e x)\right )}{2 c e}-\frac {\text {Subst}\left (\int \frac {-b+\left (a-c-\sqrt {a^2+b^2-2 a c+c^2}\right ) x}{\left (1+x^2\right ) \sqrt {a+b x+c x^2}} \, dx,x,\cot (d+e x)\right )}{2 \sqrt {a^2+b^2-2 a c+c^2} e}+\frac {\text {Subst}\left (\int \frac {-b+\left (a-c+\sqrt {a^2+b^2-2 a c+c^2}\right ) x}{\left (1+x^2\right ) \sqrt {a+b x+c x^2}} \, dx,x,\cot (d+e x)\right )}{2 \sqrt {a^2+b^2-2 a c+c^2} e}\\ &=-\frac {\sqrt {a+b \cot (d+e x)+c \cot ^2(d+e x)}}{c e}+\frac {b \text {Subst}\left (\int \frac {1}{4 c-x^2} \, dx,x,\frac {b+2 c \cot (d+e x)}{\sqrt {a+b \cot (d+e x)+c \cot ^2(d+e x)}}\right )}{c e}-\frac {\left (b \left (a-c-\sqrt {a^2+b^2-2 a c+c^2}\right )\right ) \text {Subst}\left (\int \frac {1}{-2 b \left (a-c-\sqrt {a^2+b^2-2 a c+c^2}\right )+b x^2} \, dx,x,\frac {a-c-\sqrt {a^2+b^2-2 a c+c^2}+b \cot (d+e x)}{\sqrt {a+b \cot (d+e x)+c \cot ^2(d+e x)}}\right )}{\sqrt {a^2+b^2-2 a c+c^2} e}+\frac {\left (b \left (a-c+\sqrt {a^2+b^2-2 a c+c^2}\right )\right ) \text {Subst}\left (\int \frac {1}{-2 b \left (a-c+\sqrt {a^2+b^2-2 a c+c^2}\right )+b x^2} \, dx,x,\frac {a-c+\sqrt {a^2+b^2-2 a c+c^2}+b \cot (d+e x)}{\sqrt {a+b \cot (d+e x)+c \cot ^2(d+e x)}}\right )}{\sqrt {a^2+b^2-2 a c+c^2} e}\\ &=\frac {\sqrt {a-c-\sqrt {a^2+b^2-2 a c+c^2}} \tanh ^{-1}\left (\frac {a-c-\sqrt {a^2+b^2-2 a c+c^2}+b \cot (d+e x)}{\sqrt {2} \sqrt {a-c-\sqrt {a^2+b^2-2 a c+c^2}} \sqrt {a+b \cot (d+e x)+c \cot ^2(d+e x)}}\right )}{\sqrt {2} \sqrt {a^2+b^2-2 a c+c^2} e}-\frac {\sqrt {a-c+\sqrt {a^2+b^2-2 a c+c^2}} \tanh ^{-1}\left (\frac {a-c+\sqrt {a^2+b^2-2 a c+c^2}+b \cot (d+e x)}{\sqrt {2} \sqrt {a-c+\sqrt {a^2+b^2-2 a c+c^2}} \sqrt {a+b \cot (d+e x)+c \cot ^2(d+e x)}}\right )}{\sqrt {2} \sqrt {a^2+b^2-2 a c+c^2} e}+\frac {b \tanh ^{-1}\left (\frac {b+2 c \cot (d+e x)}{2 \sqrt {c} \sqrt {a+b \cot (d+e x)+c \cot ^2(d+e x)}}\right )}{2 c^{3/2} e}-\frac {\sqrt {a+b \cot (d+e x)+c \cot ^2(d+e x)}}{c e}\\ \end {align*}
________________________________________________________________________________________
Mathematica [C] Result contains complex when optimal does not.
time = 14.55, size = 352, normalized size = 0.92 \begin {gather*} -\frac {\sqrt {\frac {-a-c+a \cos (2 (d+e x))-c \cos (2 (d+e x))-b \sin (2 (d+e x))}{-1+\cos (2 (d+e x))}}}{c e}-\frac {\left (-\frac {i c^{3/2} \text {ArcTan}\left (\frac {i b+2 c+(2 i a+b) \tan (d+e x)}{2 \sqrt {a-i b-c} \sqrt {c+\tan (d+e x) (b+a \tan (d+e x))}}\right )}{\sqrt {a-i b-c}}+\frac {c^{3/2} \tanh ^{-1}\left (\frac {b+2 i c+(2 a+i b) \tan (d+e x)}{2 \sqrt {a+i b-c} \sqrt {c+\tan (d+e x) (b+a \tan (d+e x))}}\right )}{\sqrt {a+i b-c}}-b \tanh ^{-1}\left (\frac {2 c+b \tan (d+e x)}{2 \sqrt {c} \sqrt {c+\tan (d+e x) (b+a \tan (d+e x))}}\right )\right ) \sqrt {a+b \cot (d+e x)+c \cot ^2(d+e x)} \tan (d+e x)}{2 c^{3/2} e \sqrt {c+\tan (d+e x) (b+a \tan (d+e x))}} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [B] result has leaf size over 500,000. Avoiding possible recursion issues.
time = 0.70, size = 9581713, normalized size = 24952.38 \[\text {output too large to display}\]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Failed to integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [F(-1)] Timed out
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Timed out} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \int \frac {\cot ^{3}{\left (d + e x \right )}}{\sqrt {a + b \cot {\left (d + e x \right )} + c \cot ^{2}{\left (d + e x \right )}}}\, dx \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {could not integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [F]
time = 0.00, size = -1, normalized size = -0.00 \begin {gather*} \int \frac {{\mathrm {cot}\left (d+e\,x\right )}^3}{\sqrt {c\,{\mathrm {cot}\left (d+e\,x\right )}^2+b\,\mathrm {cot}\left (d+e\,x\right )+a}} \,d x \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________